﻿using Abp.Application.Services;
using Abp.Authorization.Users;
using RMM.Authorization.Tenants;
using RMM.Core.Entity.Users;
using RMM.FrameWork;
using RMM.UserAppService.Dtos;
using RMM.Users.Dtos;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Http;

namespace RMM.UserAppService
{
    public interface IUserAppService : IApplicationService
    {
        /// <summary>
        /// 获取用户信息
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        [HttpGet]
        Task<UserDto> GetUserDetailAsync(long userId);

        /// <summary>
        /// 登陆
        /// </summary>
        /// <param name="code">js_code</param>
        /// <returns></returns>
        [HttpGet]
        Task<ResultDto> WxLoginAsync(string code);


        /// <summary>
        /// 注册并登陆
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        [HiddenApi]
        Task<string> Register(RegisterInputDto dto);

        /// <summary>
        /// 检查是否注册
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [HttpGet]
        Task<ResultDto> CheckUser(string code);

        [HttpGet]
        object GetUsers();

        Task<string> LoginAsync(string id);
    }
}
